
export function parseTimestamp(time) {
  if (time == null) {
    return new Date().getTime();
  }
  return new Date(time).getTime();
}

export function ifNull(text) {
  return text == null || text === undefined ? "" : text;
}

export function toArrayComma(text) {
  if (text == null || text === undefined) {
    return [];
  } else {
    return text.split(",");
  }
}